package com.wyf.armessage.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.TextView
import com.wyf.armessage.R
import com.wyf.armessage.model.Message

/**
 * Created by Administrator on 2017/10/17.
 */


class HomeAdapter(var mContext: Context?, var list:ArrayList<Message>) : BaseAdapter() {
    override fun getView(p0: Int, p1: View?, p2: ViewGroup?): View {
         var view = LayoutInflater.from(mContext).inflate(R.layout.item_message_list,null)
         view.findViewById<TextView>(R.id.item_index_recyview_msg)
         return  view
    }

    override fun getItem(p0: Int): Any {
      return  list.get(p0)
    }

    override fun getItemId(p0: Int): Long {
       return p0.toLong()
    }

    override fun getCount(): Int {
        return  list.size
    }


}

